import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    component: () => import("@/views/HomeView.vue")
  },
  {
    path: "/user",
    name: "userWeb",
    children: [
      {
        path: "login",
        name: "loginWeb",
        component: () => import("@/views/user/login.vue")
      },
      {
        path: "log",
        name: "userLog",
        component: () => import("@/views/user/log.vue")
      },
      {
        path: "region",
        name: "regionWeb",
        component: () => import("@/views/user/region.vue")
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
